<%@page import="model.NewsModel"%>
<%@page import="entity.News"%>
<%@page import="util.ResourceHelper"%>
<%@page import="java.util.List"%>
<%
	String cate = request.getParameter("cate");
	if(cate.equalsIgnoreCase("index")){
		cate = null;
	}
	String sub = request.getParameter("sub");
	NewsModel newsModel = new NewsModel();
	List<News> list = newsModel.findLastWeek(cate, sub);
	if(list.size()>0){
%>
<div class="box-item">
    <div class="box-item_inner">
        <h3 class="heading">
        	<a href="#"><%=ResourceHelper.getByAlias("tin-tuan-truoc") %></a>        
        </h3>
        <ul class="news-item-listing">
        	<%
        		int count = 0;
        		for(News n : list){
        			count +=1;
        	%>
            	<li class="number-grey<%=count%>"><a href="/<%=n.getAlias()%>.html"><%= n.getTitle() %></a></li>
            <%
            		
            	} 
            %>
        </ul>
        <a class="readmore" href="#"><%=ResourceHelper.getByAlias("xem-them") %></a>
    </div>
</div>
<%
	}
%>